<template>
	<view class="container">
		<HeaderNav bgcolor='rgba(255,255,255,.1)' text='结果' :showNavBackBtn='true' color='#fff'></HeaderNav>
		<view class="content">
			该产品在整个使用寿命期间将留下的碳足迹为
		</view>
		<view class="res">
			{{ numFilter(res) }} kg
		</view>
	</view>
</template>

<script>
	import HeaderNav from '@/common/HeaderNav/HeaderNav'
	export default {
		data() {
			return {
				res: -6.60
			}
		},
		onLoad(option) {
			console.log(option.res);
		},
		components: {
			HeaderNav
		},
		methods: {
			numFilter(value) {
				const resVal = parseFloat(value).toFixed(2);
				return resVal;
			}
			
		}
	}
</script>

<style lang="less" scoped>
	.container {
		width: 100vw;
		height: 100vh;
		// padding: 20rpx;
		box-sizing: border-box;
		background: linear-gradient(0deg, #021B79, #0b2997, #254dd3);
		
		.content {
			padding: 50rpx 20rpx;
			color: #f1f2f5;
			text-align: center;
			font-size: 45rpx;
		}
		
		.res {
			font-size: 60rpx;
			color: white;
			font-weight: 700;
			text-align: center;
		}
	}
</style>